import i18n from '@src/locales'
/**
 * @description 节点类型
 */
export enum FlowEnum {
  // 流程节点
  NORMAL  = 'normal',
  //开始工单节点
  START  = 'start',
  //结算工单节点
  COST  = 'cost',
  // 回访工单节点
  REVIEW  = 'review',
  //条件分支
  CONDITION = 'condition',
}

export const FlowNodeTranslateKeyMap: any = {
  [FlowEnum.NORMAL]: i18n.t('task.setting.taskTypeSetting.flowNewNode.normal'),
  [FlowEnum.START]: i18n.t('task.setting.taskTypeSetting.flowNewNode.start'),
  [FlowEnum.COST]: i18n.t('task.setting.taskTypeSetting.flowNewNode.cost'),
  [FlowEnum.REVIEW]: i18n.t('task.setting.taskTypeSetting.flowNewNode.review'), 
};

export const nodeTypeList: any[] = [
  {
    name: '',
    type: 'custom',
    list: [
      {
        type: FlowEnum.NORMAL,
        title: i18n.t('task.setting.taskTypeSetting.flowNewNode.normal'),
        icon: 'iconfont icon-liuchengjiedian',
      },
    ],
  },
  {
    name: i18n.t('task.setting.taskTypeSetting.flowNewNode.builtIn'),
    type: 'builtIn',
    list: [
      {
        type: FlowEnum.START,
        title: i18n.t('task.setting.taskTypeSetting.flowNewNode.start'),
        icon: 'iconfont icon-kaishi',
        isSystem: 1,
      },
      {
        type: FlowEnum.COST,
        title: i18n.t('task.setting.taskTypeSetting.flowNewNode.cost'),
        icon: 'iconfont icon-jiesuan',
        isSystem: 1,
      },
      {
        type: FlowEnum.REVIEW,
        title: i18n.t('task.setting.taskTypeSetting.flowNewNode.review'),
        icon: 'iconfont icon-huifang',
        isSystem: 1,
      },
    ],
  },
  {
    name: i18n.t('task.setting.taskTypeSetting.flowNewNode.public'),
    type: 'public',
    list: [],
  },
];
